-- GENERATED SPELL FOR [Auchenai Doomsayer] --


function spell0_21285(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_21285', 3500, 1)
end

function spell1_21285(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(31516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21285', 2500, 1)
end

function spell2_21285(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21285', 3000, 1)
end

function Sorts_21285(pUnit, Event)
local choix_sorts_21285 = math.random(0, 2)
if choix_sorts_21285 == 0 then
pUnit:RegisterEvent('spell0_21285', 1, 1)
end
if choix_sorts_21285 == 1 then
pUnit:RegisterEvent('spell1_21285', 1, 1)
end
if choix_sorts_21285 == 2 then
pUnit:RegisterEvent('spell2_21285', 1, 1)
end
end

function mob21285_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21285', math.random(1500, 3000), 1)
end

function mob21285_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21285_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21285_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21285, 1, 'mob21285_Action')
RegisterUnitEvent(21285, 2, 'mob21285_Leave')
RegisterUnitEvent(21285, 3, 'mob21285_Kill')
RegisterUnitEvent(21285, 4, 'mob21285_Die')
